import request from "@/utils/request";
import type {CategoryResponseData} from './type'
enum API {
    CATEGORG1_URL = '/admin/product/getCategory1',
    CATEGORG2_URL = '/admin/product/getCategory2/',
    CATEGORG3_URL = '/admin/product/getCategory3/',
}


// 一级分类
export const reqC1=()=>request.get<any,CategoryResponseData>(API.CATEGORG1_URL)

// 二级分类
export const reqC2=(category1Id:number | string)=>request.get<any,CategoryResponseData>(API.CATEGORG2_URL+`${category1Id}`)

// 三级分类
export const reqC3=(category2Id:number | string)=>request.get<any,CategoryResponseData>(API.CATEGORG3_URL+`${category2Id}`)